<?php
    require_once("./classes/sessao.php");
    require_once("./classes/interfaces.php");
    require_once("./classes/conexao.php");

    session_start();

    if (isset($_SESSION['ANAWEB']))
    {
        if (!empty($_POST['biblioteca']))
        {
            $conexao = new Conexao();
            $conexao->Conecta();

            $idbib=(int)$_POST['biblioteca'];
            $ok = $conexao->Executa("INSERT INTO requisicoes_bib (id_bib, id_user) VALUES ({$idbib},".$_SESSION['ANAWEB']->RetornaId().")");
        }
    }
    header("Location: colaborarbiblioteca.php");
?>